<?php
if(!defined('INDEX')){
	exit('Access Denied');
}
include(TPLPATH.'/admin_set/wap.tpl.php');
?>
<?php
$parameter=act_huan_list();
extract($parameter);
$webtitle=$webset['title'].'礼品兑换';
include(TPLPATH.'/huan/header_duihuan.tpl.php');
$css[]=TPLPATH.'/inc/css/huan.css';
?>


<div class="yingdao" align="center">
  <p><b>礼品兑换</b><a href="javascript:;" onClick="history.back()" title="返回" class="left"></a> </p></div>  
  
  	<div class="jifendaohang" style="background:#FFFFFF; overflow:hidden">
<div class="tag_nav" >
			<ul>
			<li>商品分类:</li>
				<a href="<?=wap_l('huan','index')?>"><li<?php if($cid==0){?> class="active"<?php }?>>全部</li></a>
				<?php foreach($huan_type as $catid=>$title){?>
				<a href="<?=wap_l('huan','index',array('cid'=>$catid))?>"><li<?php if($cid==$catid){?> class="active"<?php }?>><?=$title?></li></a>
				<?php }?>
			</ul>
		</div></div>
		
 
 <div class="duihuan">
			<?php foreach($huan as $row){$n++;?> 
			<div class="gift-detail">
					<h3 class="gift-name"><?=$row["title"]?></h3>
			<div class="gift-img"><img src="<?php echo $row["img"];?>"  border="0" alt="<?=$good['title']?>" /></div>
			<div class="gift-info">
				<ul>
					<li>
						<strong>积分:</strong><?php if($row['jifen']>0){?>
						<span class="ys1"><?=jfb_data_type($row["jifen"])?> 积分</span>
						<?php }else{?>
						不参与
						<?php }?>
					</li>
					<li>
						<strong><?=TBMONEY?>:</strong><?php if($row['jifenbao']>0){?>
						<span class="ys2"><?=jfb_data_type($row["jifenbao"])?> <?=TBMONEY?></span>	
						<?php }else{?>
						不参与
						<?php }?>
					</li>
					<li>
						<strong>剩余数量:</strong><?=jfb_data_type($row["num"])?> 份
					</li>
					
						<div class="btnduihuan"><a href="<?=wap_l('huan','view',array('id'=>$row["id"]))?>">立即兑换</a></div>
					</li>
				</ul>
		</div>
	</div>
<?php }$n=0;?> </div>
 <div class="clear"></div>
			<div class="megas513" style="margin-top:20px"><?=pageft($total,$pagesize,$page_url,WJT)?></div>

<?php
include(TPLPATH."/inc/footer.tpl.php");
?>
